#include <stdio.h>
#include <conio.h>
struct student	{
	int roll_no;
	int marks;
}student[50];

void display(int n)
{
	int i;
	printf("\nDisplaying database:\nNo.\tRoll\tMarks");
	for(i=0;i<n;i++)	{
		printf("\n[%d]\t%d\t%d",i+1,student[i].roll_no,student[i].marks);
	}
}

void main()
{
	int i,n;
	clrscr();
	printf("\nEnter no. of students:");
	scanf("%d",&n);
	for(i=0;i<n;i++)	{
		printf("Enter roll no.[%d]:",i+1);
		scanf("%d",&student[i].roll_no);
		printf("Enter marks [%d]:",i+1);
		scanf("%d",&student[i].marks);
	}
	display(n);
	getch();
}
